import { Component, Input, OnInit } from '@angular/core';

@Component({
  selector: 'app-myc04',
  templateUrl: './myc04.component.html',
  styleUrls: ['./myc04.component.css']
})
export class Myc04Component implements OnInit {

  @Input() name!: string;
  @Input() age!: number;
  @Input() boss!: Boss;
  constructor() {
  }
  ngOnInit(): void { }
}
// 自定义数据类型
interface Boss {
  name: string,
  age: number,
  sex: string
}
